import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import echarts from './views/charts/echarts.vue'
import InviteCode from "./views/inviteCode/InviteCode.vue";
import InviteCode2 from "./views/inviteCode2/InviteCode2.vue";
import User from "./views/user/User"
import Admin from "./views/admin/Admin"
let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: 'Lucky-Wheel',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/main', component: Main, name: '主页' ,hidden: true},
            { path: '/inviteCode', component: InviteCode, name: '第一阶段' },
            { path: '/inviteCode2', component: InviteCode2, name: '第二阶段' },
            { path: '/user', component: User, name: '用户' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织机构',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/admin', component: Admin, name: '管理员' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: 'echarts' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;